#include <network/streamingClient.h>
#include <oglapp.h>

#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
#include <vector>

int main(int argc, char* argv[]) {
  
  if (argc < 2) {
    std::cout << "missing program arguments." << std::endl;
    return 1;
  }

  streamingClient &client = streamingClient::instance();

  client.setCacheDir("cache");
  //client.setConnection("localhost", "9000");
  //client.setConnection("192.168.0.142", "9000");
  //client.setConnection("192.168.0.113", "9000");
  client.setConnection("147.229.12.130", "9000");
  //client.setConnection  ("147.229.14.238", "9000");
  //client.setConnection("192.168.1.170", "9000");
  client.setLogin("world", "jarek", "uriden0t");

  client.start();

  if (client.isInitialized()) {
    if (oglapp::instance().start(argc, argv)) {
      glutMainLoop();
    }

    client.stop();
  }

  client.destroy();

  return 0;
}
